package com.cskaoyan.app.controller;

import com.cskaoyan.app.bean.common.BaseRespVo;
import com.cskaoyan.app.bean.common.CommonData;
import com.cskaoyan.app.bean.vo.RegionDataVO;
import com.cskaoyan.app.service.AdminRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdminReginController {

    @Autowired
    private AdminRegionService service;

    @GetMapping("admin/region/list")
    public BaseRespVo<CommonData<RegionDataVO>> listRegion() {
        CommonData<RegionDataVO> data = service.listRegion();
        return BaseRespVo.ok(data);
    }
}
